﻿<UserControl x:Class="Probel.Ldoc.Views.Controls.DoctorPopupView"
             
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:conv="clr-namespace:Probel.Ldoc.Views.Converters"
             xmlns:t="clr-namespace:Probel.Ldoc.Views.Properties"
             xmlns:ctrl="clr-namespace:Probel.Ldoc.Views.Controls"
             
             mc:Ignorable="d" 
             
             Height="400" 
             Width="300">
    <Border BorderThickness="5"
            CornerRadius="5">
        <Border.Effect>
            <DropShadowEffect Color="#FFB6B6B6"/>
        </Border.Effect>
        <DockPanel  Background="#FFF6F6F6">
            <DockPanel DockPanel.Dock="Top"
                       LastChildFill="False"
                       Height="30">
                <TextBox x:Name="focused"
                     DockPanel.Dock="Left"
                     Text="{Binding Criterion, UpdateSourceTrigger=PropertyChanged}"
                     Margin="5,5,0,5"
                     Width="250">
                    <TextBox.InputBindings>
                        <KeyBinding Key="Enter"
                                Command="{Binding SearchCommand}"/>
                    </TextBox.InputBindings>
                </TextBox>
                <Button DockPanel.Dock="Left"
                    Background="{x:Null}" 
                    BorderBrush="{x:Null}"
                    Command="{Binding SearchCommand}">
                    <Image Source="/Probel.Ldoc.Views;component/Images/Magnifier.png" 
                       Stretch="None"/>
                </Button>
            </DockPanel>
            <ListBox ItemsSource="{Binding Doctors}"
                 HorizontalContentAlignment="Stretch"
                 VerticalContentAlignment="Stretch"
                 SelectedItem="{Binding SelectedDoctor}" 
                 MouseLeftButtonUp="ResultList_Click">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <ctrl:DoctorCardView/>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ListBox>
        </DockPanel>
    </Border>
</UserControl>